package com.android.guoqi.sms

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent

class BootCompletedReceiver : BroadcastReceiver() {

    override fun onReceive(context: Context, intent: Intent) {
        if (intent.action == ACTION) {
            val intent2 = Intent(context, MainActivity::class.java)
            intent2.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
            context.startActivity(intent2)
        }

    }

    companion object {
        internal val ACTION = "android.intent.action.BOOT_COMPLETED"
    }
}